package com.carkeeper.service.serviceFallback;


import com.carkeeper.dto.ComponentDTO;
import com.carkeeper.service.ComponentFeign;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author ：XXX
 * @date ：Created in 2020/6/4
 * @description ：
 * @version: 1.0
 */
@Component
public class ComponentFallbackFactory implements FallbackFactory<ComponentFeign> {
    @Override
    public ComponentFeign create(Throwable throwable) {
        return new ComponentFeign() {
            @Override
            public ComponentDTO getComponent(Long id) {
                return null;
            }

            @Override
            public List<ComponentDTO> getByIds(List<Long> ids) {
                return null;
            }
        };
    }

}
